package com.wang.loanassembly.controller;


import com.ddc.api.param.ApplyLoanParam;
import com.ddc.api.param.LoanCheckParam;
import com.ddc.api.param.LoanPurpersParam;
import com.ddc.api.param.RepayPlanParam;
import com.wang.commons.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author lichacha
 * @since 2022-01-04
 */
@Controller
@Api(tags="贷款接口")
public class LoanRecordController {
    //贷款申请的方法
    @PostMapping("apply")
    @ApiOperation("申请贷款的接口")
    public Result apply(@RequestBody ApplyLoanParam applyLoanParam){
        return null;
    }


    //贷款进度查询
    @ApiOperation("查询贷款进度的方法")
    @GetMapping("progress")
    public Result  checkProgress( @ApiParam(value = "身份证号码",name = "lrsUserIdcard",required = true)@RequestParam("lrsUserIdcard") String lrsUserIdcard){
        return null;
    }
    //还款计划表查看
    @ApiOperation("还款计划展示")
    @PostMapping("repayPlan")
    public Result selectRepayPlan(@RequestBody RepayPlanParam rp){
        return null;
    }

    /**
     * 贷款审核的接口
     * 根据传入的用户id，贷款金额
     * 展示是否通过审核
     */
    @ApiOperation("贷款审核的接口")
    @PostMapping("check")
    public Result loanCheck(@RequestBody LoanCheckParam lcp ){ return null;}

    /**查询贷款的用途
     * 根据传入的用途id查询对应的来款用途
     */
    @ApiOperation("查询贷款用途的方法")
    @PostMapping("purpers")
    public Result loanPur(@RequestBody LoanPurpersParam lpp ){ return null;}

    /**
     * 查询还款方式方式的方法
     * 查询，传入还款id，如果传入的id为空则查所有
     *返回还款方式和方式id；
     */
    @PostMapping("repayway")
    @ApiOperation("查询还款方式的方法")
    public Result repayWay(@ApiParam(value = "还款方式id",name = "id",required = true) @PathVariable("id") Integer id){ return null;}

    /**
     * 查询贷款期数以及利率的计算，传入贷款期数id，如果传入的id为空，则查询所有的贷款期数
     */
    @ApiOperation("查询贷款的时长以及贷款利率的计算")
    @PostMapping("loantime")
    public Result LoanTime(@ApiParam(value = "贷款时长id",name = "id",required = true) @PathVariable("id") Integer id){ return null;}


}

